In [5]:
d = loadtxt('./initial-value-distribution-cleanup.csv', delimiter=',')
plot(d)
m = d[:,0]
figure()
plot(m)


Out[5]:
[<matplotlib.lines.Line2D at 0x7f15d7b92090>]

In [6]:
last = 0
r=[]
for v in m:
    if last != v:
        r.append(v)
        last=v

plot(r)


Out[6]:
[<matplotlib.lines.Line2D at 0x7f15d7af5dd0>]

In [9]:
print ("Mean: " + str(mean(r)))
print ("Median: " + str(median(r)))
stddev=sqrt(sum((r-median(r))**2)/size(r))
print ("Standard deviation: " + str(stddev))
hist(r)
xlabel("Value in free air")
ylabel("Count")


Mean: 210.634615385
Median: 210.0
Standard deviation: 2.17355905702
Out[9]:
<matplotlib.text.Text at 0x7f15d7f98e50>

Initial sensor value in free air: 210+-2


In [14]:
d = loadtxt('./initial-value-distribution2.csv', delimiter=',')
plot(d)


Out[14]:
[<matplotlib.lines.Line2D at 0x7f15d770e090>,
 <matplotlib.lines.Line2D at 0x7f15d770e290>]

In [17]:
r=d[:,0]
print ("Mean: " + str(mean(r)))
print ("Median: " + str(median(r)))
stddev=sqrt(sum((r-median(r))**2)/size(r))
print ("Standard deviation: " + str(stddev))
hist(r)
xlabel("Value in free air")
ylabel("Count")


Mean: 211.450980392
Median: 211.0
Standard deviation: 1.99017193069
Out[17]:
<matplotlib.text.Text at 0x7f15d74d6850>

In [ ]: